<template>
	<div class="search-index container">
		<Header></Header>
		<section>
			<div>
				<h1>历史搜索</h1>
				<div>全部删除</div>
			</div>
			<ul>
				<li v-for="(item,index) in searchList"
					:key='index'
				>{{item}}</li>
			</ul>
		</section>
		<Tabbar></Tabbar>
	</div>
</template>

<script>
	import Header from '@/components/search/Header.vue'
	import Tabbar from '@/components/common/Tabbar.vue'
	export default{
		data(){
			return {
				searchList:[],
			}
		},
		created(){
			this.searchList = JSON.parse( localStorage.getItem('search') );
		},
		components:{
			Header,
			Tabbar,
		},
		methods:{
			goSearchList(){
				this.$router.push({
					name:'list',
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	section{
		ul{
			li{
				border: 1px solid black;
			}
		}
	}
</style>
